package text_2023_09_20;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/20 20:48:39
 */
public class PrintGenericArray {
    public static <T extends Integer>void printArray(List<T> array){
        for(T a : array) {
            System.out.println(a);
        }
    }
    public static void main(String[] args) {
        List<Integer> array = new ArrayList<>();
        for(int i = 1;i<=5;i++){
            array.add(i);
        }
        printArray(array);

    }
}
